<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>查看访问统计</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<%=basePath %>css/style.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath %>css/admin.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath %>css/common.css" />
	<script type="text/javascript" charset="utf-8" src="<%=basePath %>js/wdatepicker/WdatePicker.js"></script>
	<script type="text/javascript">
		function goTo(){
			var page=document.getElementById("page").value;
			if(page==""){
				alert("页数不能为空!");
				return false ;
			}
			if (page.length > 0){
                var regu = /^[-]{0,1}[0-9]{1,}$/; 
                if(!regu.test(page)){
                   alert("您输入的页码必须为数字");
                   return false;
                }
            }
			
			location.href="<%=basePath %>admin/visit/listSysVisitStatistic.action?visitPoint=<s:property value='condition.visitPoint'/>&startDate=<s:property value='condition.startDate'/>&endDate=<s:property value='condition.endDate'/>&currentPage="+page;
		}
	</script>
	<style type="text/css">
	 .linkUseless{poorfish:expression(this.onclick=function kill(){return false})}
	</style>
  </head>
  <body>
  <table width="95%" border="0" align="center" cellspacing="0">
  <tr><td height="30">
      <table width="100%" border="0">
      <tr><td width="30"><img src="<%=basePath %>images/location_left.gif" width="24" height="30" />
      </td><td>
                         您当前的位置是：系统访问统计 -&gt;查看系统访问统计
	  </td>
      </tr>
      <tr>
      	<td colspan="2"><hr/></td>
      </tr>
    </table></td>
  </tr>
  <tr><td>
      <form id="form1" name="form1" method="post" action="<%=basePath %>admin/visit/listSysVisitStatistic.action">
      <table width="100%" class=TableList style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 100%; BORDER-RIGHT-WIDTH: 0px">
        <tr>
          <td>
            访问点：<select style="width:80px;" name="visitPoint" id="visitPoint">
           <option value="0">全部</option>
           <option value="1" <s:if test='%{condition.visitPoint == 1}'>selected</s:if> >管理平台</option>
           <option value="2" <s:if test='%{condition.visitPoint == 2}'>selected</s:if> >短信防火墙</option>
           <option value="3" <s:if test='%{condition.visitPoint == 3}'>selected</s:if> >销量统计</option>
           <option value="4" <s:if test='%{condition.visitPoint == 4}'>selected</s:if> >广告系统</option>
           <option value="5" <s:if test='%{condition.visitPoint == 5}'>selected</s:if> >商城</option>
           <option value="6" <s:if test='%{condition.visitPoint == 6}'>selected</s:if> >浏览器相关</option>
       </select>
                &nbsp;&nbsp;
                起始时间：<input name="startDate" id="startDate" type="text"  value="<s:property value='condition.startDate'/>"  class="Wdate" onclick="WdatePicker()" />
                &nbsp;&nbsp;
                结束时间：<input name="endDate" id="endDate" type="text" class="Wdate" value="<s:property value='condition.endDate'/>" onclick="WdatePicker()" />
                &nbsp;&nbsp;
          		<input type="submit" name="Submit" value="查询" class="Button"/>
          		&nbsp;&nbsp;
          		<input type="reset" name="Reset" value="重置" class="Button"/>
          	</td>
          </tr>
          <tr>
      		<td><hr/></td>
      		</tr>
      </table>
      </form>
      </td>
      </tr>
      <tr><td><table class=TableList style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 100%; BORDER-RIGHT-WIDTH: 0px">
          <tr>
          	<td colspan="10" style="color:#fffff;">
          		<strong>查询结果</strong>
          	</td>
          	<td colspan="2" align="right">
          	</td>
          </tr>
         <tr>
         <td colspan="12">
         <table width="100%" border="1"  class=TableList style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 100%; BORDER-RIGHT-WIDTH: 0px">
         <tr bgcolor="#EAEEF4">
          <td align="center"  ><strong>访问点</strong></td>
          <td align="center"><strong>访问量</strong></td>
          <td align="center"><strong>日期</strong></td>
          </tr>
          <s:iterator value="%{result}" id="bean">
           <tr  class=<s:if test="#flag.even">Row1 onMouseOver="this.className='SelRow'" onMouseOut="this.className='Row1'"</s:if><s:else>Row0 onMouseOver="this.className='SelRow'" onMouseOut="this.className='Row0'"</s:else> >
		          <td align="center">
		          <s:if test='%{#bean.visitPoint == 0}'>其它</s:if>
		          <s:if test='%{#bean.visitPoint == 1}'>管理平台</s:if>
		          <s:if test='%{#bean.visitPoint == 2}'>短信防火墙</s:if>
		          <s:if test='%{#bean.visitPoint == 3}'>销量统计</s:if>
		          <s:if test='%{#bean.visitPoint == 4}'>广告系统</s:if>
		          <s:if test='%{#bean.visitPoint == 5}'>商城</s:if>
		          <s:if test='%{#bean.visitPoint == 6}'>浏览器相关</s:if>
		          </td>
		          <td align="center"><s:property value="#bean.visitNum" /></td>
		          <td align="center"><s:property value="#bean.date" /></td>
       		 </tr>
          </s:iterator>
       		 
        <tr>
          <td colspan="12" bgcolor="#EEF0F2"><table width="100%" border="0">
            <tr>
              <td>
	              [<a href="<%=basePath %>admin/visit/listSysVisitStatistic.action?&currentPage=1&visitPoint=<s:property value='condition.visitPoint'/>&startDate=<s:property value='condition.startDate'/>&endDate=<s:property value='condition.endDate'/>">首页</a> ]
	              [<a <s:if test="currentPage<=1">class="linkUseless" disabled="disabled"</s:if>  href="<%=basePath %>admin/visit/listSysVisitStatistic.action?&currentPage=<s:property value='currentPage-1'/>&visitPoint=<s:property value='condition.visitPoint'/>&startDate=<s:property value='condition.startDate'/>&endDate=<s:property value='condition.endDate'/>">上一页</a> ]
	              [<a <s:if test="currentPage>=condition.totalPage">class="linkUseless" disabled="disabled"</s:if> href="<%=basePath %>admin/visit/listSysVisitStatistic.action?&currentPage=<s:property value='currentPage+1'/>&visitPoint=<s:property value='condition.visitPoint'/>&startDate=<s:property value='condition.startDate'/>&endDate=<s:property value='condition.endDate'/>">下一页</a> ]
	              [<a href="<%=basePath %>admin/visit/listSysVisitStatistic.action?currentPage=<s:property value='condition.totalPage'/>&visitPoint=<s:property value='condition.visitPoint'/>&startDate=<s:property value='condition.startDate'/>&endDate=<s:property value='condition.endDate'/>">尾页</a>]
              </td>
              <td>&nbsp;</td>
              <td>第<s:property value="condition.currentPage"/>页/共<s:property value="condition.totalPage"/>页  共 <s:property value="condition.total"/> 条记录&nbsp;&nbsp;每页<s:property value="condition.pageSize"/>行</td>
              <td align="right">  转到
                <input type="text" name="page" value="${currentPage}" style="width:20px" />
页
<input id="page" name="Input" type="button" style="width:25px" value="GO" onclick="goTo();"/></td>
            </tr>
          </table></td>
          </tr>
         </table>
         </td>
         </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>
